/**
 * Created by 小超 on 2015/3/23.
 */
module.exports = function (grunt) {
    // Project configuration.
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        //concat: {
        //    options: {
        //        separator: ';'
        //    },
        //    dist: {
        //        src: ['public/javascripts/src/ease.css', 'public/javascripts/src/login.css', 'public/javascripts/src/mystart.css', 'public/javascripts/src/style.css'],
        //        dest: 'public/javascripts/build/car.css'
        //    }
        //}
        //,
        //concat: {
        //    options: {
        //        separator: ';'
        //    },
        //    dist: {
        //        src: ['public/javascripts/src/app.js','public/javascripts/src/controllers.js', 'public/javascripts/src/orderControllers.js', 'public/javascripts/src/centerControllers.js', 'public/javascripts/src/services.js', 'public/javascripts/src/centerServices.js', 'public/javascripts/src/orderServices.js', 'public/javascripts/src/directive.js', 'public/javascripts/src/toast.js'],
        //        dest: 'public/javascripts/src/car.js'
        //    }
        //}
        //,
        uglify: {
            options: {
                mangle: false, //不混淆变量名
                preserveComments: 'all', //不删除注释，还可以为 false（删除全部注释），some（保留@preserve @license @cc_on等注释）
                banner: '! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> \n'
            },
            build: {
                src: 'public/javascripts/src/car.js',
                dest: 'public/javascripts/build/car.min.js'
            }
        }
    });

    //grunt.loadNpmTasks('grunt-contrib-concat');
    //// 默认任务
    //grunt.registerTask('default', ['concat']);


    //Load the plugin that provides the "uglify" task.
    grunt.loadNpmTasks('grunt-contrib-uglify');
    // Default task(s).
    grunt.registerTask('default', ['uglify']);
};